<include file="Public:header" />

<div id="home">

    <div id="header">

        <div style="height:28px; padding-top:10px; background:url(__PUBLIC__/Front/images/xy.png) 10px 8px no-repeat" class="logo"><span onclick=" history.go(-1);">&nbsp;</span></div>

        <div class="shoptitle"><span>我的银行卡</span></div>

        <include file="Public:righttop" />

    </div>

</div>

<include file="Public:procat" />

<style type="text/css">

    .add{
        width: 85%;
        margin: 0 auto;
        border: 1px solid #fa7c87;
        padding: 15px 0;
        text-align: center;
        border-radius: 5px;
        background: #FFFFFF;
    }
    .add a{
        color: #fa7c87;
    }

    .mr-address{
        background: #FFFFFF;
        border-bottom: 1px solid #eaeaea;
        margin:30px 0px;
        padding: 20px 10px;
    }
    .address{
        overflow: hidden;
    }
    .address p{
        float: left;
        padding-left: 25px;
        background: url(__PUBLIC__/front/images/bankcard_list/get-select.png) no-repeat left center;
    }
    .address a{
        padding-left: 25px;
        float: right;
        margin-left: 50px;
        color: #666666;
    }
    .mr-address{
        line-height: 36px;
        color: #666666;
    }

</style>

<script>

    $url_handle_bankcard = "{:U('Member/handle_bankcard')}";

    function handle_bankcard($type, $card_id) {


        $.post($url_handle_bankcard, {typt: $type, id: $card_id}, function ($r) {

            console.log($r);

            if ($r.status) {

                jAlert($r.info, '完成');
                return;
            } else {

                jAlert($r.info, '警告');
                return;
            }
        });
    }

</script>


<div id="main" style="">

    <header style="background: #FFFFFF;padding: 15px 0;">

        <div class="add">

            <a href="{:U('Member/add_member_bankcard')}">

                <p>
                    <span>

                        <img align="absmiddle" src="__PUBLIC__/front/images/bankcard_list/bankcard.png" width="24px">

                    </span>
                    新增银行卡
                </p>

            </a>

        </div>

    </header>	

    <volist name="bankcard_list" id="bl">
        
        <nav class="mr-address">

            <div class="address">

                <if condition="$bl.is_default eq 1" >
                    <p>默认银行卡</p>
                </if>

                <a href="javascript:;" onclick='handle_bankcard("del", {$bl.id});' style="background: url(__PUBLIC__/front/images/bankcard_list/dele.png) no-repeat left center;">删除</a>

          </div>

            <p>{$bl.account_name} {$bl.phone}</p>

            <p>{$bl.bank_name}</p>

            <p>{$bl.account_bank}</p>

        </nav>
        
    </volist>

<!--    <nav class="mr-address">

        <div class="address">

            <p>默认银行卡</p>

            <a href="javascript:;" onclick='handle_bankcard("del", 1);' style="background: url(__PUBLIC__/front/images/bankcard_list/dele.png) no-repeat left center;">删除</a>

            <a href="{:U('Member/edit_member_bankcard',array('id'=>5))}" style="background: url(__PUBLIC__/front/images/bankcard_list/xiugai.png) no-repeat left center;">修改</a>

        </div>

        <p>行己 13462220758</p>

        <p>中国银行</p>

        <p>6152 1231 4526 123</p>

    </nav>-->

</div>

<include file="Public:footer" />